include ../Port/row

table
	tr
		td.neutral(colspan='2')
			h3 Device
			button#edit(onclick='window.location.href=\'/device/' + device._id + '/edit\'') Edit
	tr
		-if(device.status == 'online')
			td.ok(colspan='2') Online
		-if(device.status == 'offline')
			td.error(colspan='2') Offline
		-if(device.status == 'noconf')
			td.warn(colspan='2') New Device
	tr
		td.neutral.editLabel Device Name
		td.neutral= device.name
	tr
		td.neutral.editLabel MAC Address
		td.neutral= device.hwAddress
	tr
		td.neutral.editLabel IP Address
		td.neutral.link(onclick='window.location.href=\'http://' + device.inetAddress + '\'')
			= device.inetAddress
	tr
		td.neutral.editLabel Location
		td.neutral= device.location
	tr
		td.neutral.editLabel Description
		td.neutral= device.description
	tr
		td(rowspan= device.ports.length + 1).neutral Ports
		td.neutral
			span.indicator#UpdateIndicate &nbsp;
			input#editAddPort(
				type='button',
				value='Add Port',
				onclick='window.location=\'/port/add/' + device._id + '\'').link
	each port in device.ports
		tr
			mixin PortRow(port, device)
